package com.demo.provider1.service.impl;

import com.demo.common.bean.Book;

import com.demo.provider1.mapper.Provider1Mapper;
import com.demo.provider1.service.Provider1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: xiaoxiangjie
 * @Description:
 * @Date: 2021/3/21
 */
@Service
public class Provider1ServiceImpl implements Provider1Service {


    @Autowired
    private Provider1Mapper provider1Mapper;


    @Override
    public List<Book> getBookInfo(Book book) {
        List<Book> books = new ArrayList<>();
        books.add(provider1Mapper.getBookInfo(book));
        return books;
    }

    @Override
    public String addBookInfo(Book book) {
         provider1Mapper.addBookInfo(book);
         return "success";
    }
}
